<template>
    <van-button style="margin: 10px 0; height: 36px" block size="small" @click.stop="del" type="danger">{{ msg }}</van-button>
</template>

<script>
    export default {
        props: {
            id : String,
            msg : {
                type : String,
                default : '删除当前组件'
            }
        },
        methods : {
            del(){
                this.$store.commit('delElement', this.id)
            }
        }
    }
</script>